<!--{template admin/header}-->
{if !$admin_check_allow}
<h3>为安全起见，您没有编辑 <font color="#D94446">{$member_info['nickname']}</font> 用户信息的权限，请使用<b>网站创始人</b>的身份登录后再进行编辑操作。</h3>
<div>关于“<b>网站创始人</b>”，请参阅readme.txt文件中的第三条说明，<a title="点此在新窗口中打开查看关于“网站创始人”的说明及设置方法" href="{conf site_url}/readme.txt" target="_blank">点击查看&gt;&gt;</a></div>
{/if}
<form method="post" action="{$action}">
  <INPUT TYPE="hidden" name='uid' value={$this->ID}>
  <INPUT TYPE="hidden" name='old_username' value={$username}>
  <a name="{$this->Title} - {$username}"></a>
  <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
    <tr class="header">
      <td colspan="2">{$this->Title} - {$nickname}</td>
    </tr>
	<tr>
      <td width="40%" bgcolor="#F8F8F8"><b>帐户昵称:</b><br>
        <span class="smalltxt">如不是特别需要，请不要修改</span></td>
      <td bgcolor="#FFFFFF"><strong>
        <input name="nickname" type="text" id="nickname" value="{$nickname}" size="30" />{$member['validate_html']}
      </strong></td>
    </tr>
	<!--#if NEDU#-->
	<!--{if defined('NEDU_MOYO')}-->
		<!--{echo nui('jsg')->hook('admin.member.info.dsp');}-->
	<!--{/if}-->
	<!--#endif#-->
    <tr>
      <td width="40%" bgcolor="#F8F8F8"><b>登录密码:</b><br>
        <span class="smalltxt">如果不更改密码此处请留空</span></td>
      <td bgcolor="#FFFFFF"><input type="text" size="30" name="password">      </td>
    </tr>
	<!--{if $this->Config[company_enable]}-->
	<tr>
	    <td width="110" align="right" valign="top"><b>所属{$d_c_name}:</b></td>
	    <td><input type="hidden" name="companyid" id="companyid" value="{$member_info[companyid]}">{$companyselect}</td>
	  </tr>
	  <!--{if $this->Config[department_enable]}-->
	  <tr>
	    <td width="110" align="right" valign="top"><b>所在{$d_d_name}:</b></td>
	    <td><input type="hidden" name="departmentid" id="departmentid" value="{$member_info[departmentid]}"><div id="departmentselect">{$departmentselect}</div></td>
	  </tr>
	<!--{/if}-->
	<!--{/if}-->
	<!--{if !((true === UCENTER_FACE && true === UCENTER) || (true === UCENTER_FACE && true === PWUCENTER))}-->
	<tr>
      <td width="40%" bgcolor="#F8F8F8"><b>用户头像:</b>
      <td bgcolor="#FFFFFF"><a href="nanbo.php?mod=member&code=editface&uid={$uid}"><img src="{$member_face}" width="50px" height="50px" title="点击修改" onerror="javascript:faceError(this);">点此修改头像</a></td>
	</tr>
	<!--{/if}-->
	<tr>
      <td width="40%" bgcolor="#F8F8F8"><b>用户所在地:</b></td>
      <td bgcolor="#FFFFFF"><div style="float:left;">{$province_list}</div>
      <div style="float:left;"><select id="city" name="city" onchange="changeCity();">
        <option value="0">请选择</option>
	  </select></div>
      <div style="float:left;"><select id="area" name="area" onchange="changeArea();" style="display:none">
        <option value="0">请选择</option>
	  </select></div>
      <div style="float:left;"><select id="street" name="street" style="display:none">
        <option value="0">请选择</option>
	  </select></div>
	   <input type="hidden" id="hid_city" name="hid_city" value="$hid_city">
	   <input type="hidden" id="hid_area" name="hid_area" value="$hid_area">
	   <input type="hidden" id="hid_street" name="hid_street" value="$hid_street">
	  </td>
    </tr>
    <tr>
      <td width="40%" bgcolor="#F8F8F8"><b>用户角色:</b><br>
        <span class="smalltxt"></span></td>
      <td bgcolor="#FFFFFF">
	   <!--{if true===JISHIGOU_FOUNDER || 'admin'!=$member_info[role_type]}-->
        {$role_select}
       <!--{else}-->
        {$role_name}
       <!--{/if}-->
       </td>
    </tr>
    
    <tr id="causetext" style="display:none; width:100%;" >
      <td width="40%" bgcolor="#F8F8F8"><b>封杀理由:</b><br>
        <span class="smalltxt">将用户放入禁言组或封杀组时的理由</span></td>
      <td bgcolor="#FFFFFF"><input type="text" size="30" name="cause" value="{$cause}"></td>
      </tr>
      <script type="text/javascript">
      function showcause(){
          var role_id = document.getElementById('role_id').value;
          if(role_id == '4' || role_id == '118'){
			  document.getElementById('causetext').style.display = 'block';
          }else{
			  document.getElementById('causetext').style.display = 'none';
          }
      }
      showcause();
     </script>
     
     
    <tr>
      <td width="40%" bgcolor="#F8F8F8"><b>性别:</b></td>
      <td bgcolor="#FFFFFF"> {$gender_radio}</td>
    </tr>
    <tr>
      <td width="40%" bgcolor="#F8F8F8"><b>Email:</b></td>
      <td bgcolor="#FFFFFF"><input type="text" size="30" name="email" value="{$email}">
	  <label class="label"><input type="checkbox" name="email_checked" value="1" {eval if($email_checked) echo 'checked'}>通过验证</label>
	  </td>
    </tr>
    <tr>
      <td width="40%" bgcolor="#F8F8F8"><b>注册IP:</b></td>
      <td bgcolor="#FFFFFF"><input type="text" size="30" name="regip" value="{$regip}">	  </td>
    </tr>
    <tr>
      <td width="40%" bgcolor="#F8F8F8"><b>个性域名:</b><br>
        <span class="smalltxt">如不是特别需要，请不要修改</span></td>
      <td bgcolor="#FFFFFF">
        <input type="text" size="30" name="username" value="{$username}">
      </td>
    </tr>
	<tr>
      <td width="40%" bgcolor="#F8F8F8"><b>关于{$nickname}:</b><br>
	  <span class="smalltxt">该信息显示在用户微博页面右侧</span>
	  </td>
      <td bgcolor="#FFFFFF"><textarea name="aboutme" cols="30" rows="3" id="aboutme">{$aboutme}</textarea></td>
	</tr>
  </table>
  <center>
    <input type="submit" class="button" name="editsubmit" value="提 交">
  </center>
  <br>
  <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
    <tr class="header">
      <td colspan="2">真实信息（证件号码不会对外显示，仅供管理员核对用户身份用）</td>
    </tr>
    <tr>
      <td width="40%" bgcolor="#F8F8F8"><b>真实姓名:</b></td>
      <td bgcolor="#FFFFFF"><input type="text" name="validate_true_name" value="{$member_info[validate_true_name]}" size="30" /></td>
    </tr>
    <tr>
      <td width="40%" bgcolor="#F8F8F8"><b>证件类型:</b></td>
      <td bgcolor="#FFFFFF">{$validate_card_type_select}</td>
    </tr>
    <tr>
      <td width="40%" bgcolor="#F8F8F8"><b>证件号码:</b></td>
      <td bgcolor="#FFFFFF"><input type="text" name="validate_card_id" value="{$member_info[validate_card_id]}" size="30" /></td>
    </tr>
	<!--<tr>
      <td width="40%" bgcolor="#F8F8F8"><b>是否V认证:</b><br>
	  <span class="smalltxt">选择是，用户头像右侧会显示一个认证图标</span></td>
      <td bgcolor="#FFFFFF">{$validate_radio}</td>
    </tr>-->
	 <tr>
      <td width="40%" bgcolor="#F8F8F8"><b>V认证备注:</b><br>
	  <span class="smalltxt">鼠标在认证图标悬浮时，会看到右侧填写的信息</span></td>
      <td bgcolor="#FFFFFF"><input type="text" name="validate_remark" value="{$member_info[validate_remark]}" size="30" /></td>
    </tr>
  </table>
  <center>
    <input type="submit" class="button" name="editsubmit" value="提 交">
  </center>
  <br>
  <!--{loop $groupProfile $k $v}-->
  <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
    <tr class="header">
      <td colspan="2">$v['title']</td>
    </tr>
        <!--{loop $v['list'] $key $val}-->
        <tr>
          <td width="40%" bgcolor="#F8F8F8"><b>$val['title']：</b></td>
          <td>
            <!--{if $val['formtype'] == 'text'}-->
            <input type="text" name="{$key}" class="p1" value="$member[$key]">
            <!--{elseif $val['formtype'] == 'select'}-->
              <!--{if $val['choices']}-->
	            <select name="{$key}" class="select">
	              <!--{eval $choices = explode("\r\n",$val['choices']) ; print_r($choices);}-->
	              <!--{loop $choices $s_k $s_v}-->
	              <!--{eval list($v1,$v2)=explode("|",$s_v);$v2 || $v2=$v1;$select='';if($v1 == $member[$key]) $select="selected"}-->
	              <option value="{$v1}" $select>{$v2}</option>
	              <!--{/loop}-->
	            </select>
              <!--{elseif ('birthcity' == $key)}-->
				  <span>$member['birthcity']</span>
              <!--{/if}-->
            <!--{elseif $val['formtype'] == 'textarea'}-->
            <textarea name="{$key}">$member[$key]</textarea>
            <!--{elseif $val['formtype'] == 'date'}-->
              <script src="./js/date/WdatePicker.js" type="text/javascript"></script>
              <input class="p1" type="text" name="$key" value="{$member[$key]}" readonly onFocus="WdatePicker({startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"/>
            <!--{else}-->
            <!--{/if}-->
          </td>
        </tr>
        <!--{/loop}-->
  </table>
  <center>
    <input type="submit" class="button" name="editsubmit" value="提 交">
  </center>
  <!--{/loop}-->
  <br>
  <!--{if $this->Config[extcredits_enable]}-->
  <a name="用户积分"></a>
  <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
    <tr class="header">
      <td colspan="2">用户积分</td>
    </tr>
    <!--{loop $this->Config[credits][ext] $_k $_v}-->
    <tr>
      <td width="40%" bgcolor="#F8F8F8"><b>{$_v[name]}:</b></td>
      <td bgcolor="#FFFFFF"><input type="text" size="30" name="{$_k}" value={$member_info[$_k]}>
      </td>
    </tr>
    <!--{/loop}-->
  </table>
  <center>
    <input type="submit" class="button" name="editsubmit" value="提 交">
  </center>
  <br>
  <!--{/if}-->
</form>
<script type="text/javascript">
function changeProvince(){
  var province = document.getElementById("province").value;
  var hid_city = document.getElementById("hid_city").value;
  var url = "ajax.php?mod=member&code=sel&type=top&province="+province + "&hid_city="+hid_city;
  var myAjax=$.post(
		  	url,
		  	function(d){
	  		    $('#' + "city").html(d);
	  		    document.getElementById('area').length = 1;
	  		    document.getElementById('street').length = 1;
				changeCity();
		  	}
  );
}
changeProvince();
function changeCity(){
  var province = document.getElementById("province").value;
  var city = document.getElementById("city").value;
  document.getElementById("area").style.display = '';
  var hid_area = document.getElementById("hid_area").value;
  
  if(city){
    var url = "ajax.php?mod=member&code=sel&type=top&city="+city+"&hid_area="+hid_area;
    var myAjax=$.post(
		  	url,
		  	function(d){
				if(d){
					document.getElementById("area").style.display = "block";
		  		    $('#' + "area").html(d);
					changeArea();
				}else{
					document.getElementById("street").style.display = "none";
					document.getElementById("area").style.display = "none";
					
					document.getElementById("hid_city").value = '';
					document.getElementById("hid_area").value = '';
					document.getElementById("hid_street").value = '';
				}
		  	}
  );
  }else{
		document.getElementById("street").style.display = "none";
		document.getElementById("area").style.display = "none";
		
		document.getElementById("hid_city").value = '';
		document.getElementById("hid_area").value = '';
		document.getElementById("hid_street").value = '';
  }
}
function changeArea(){
  var area = document.getElementById("area").value;
  var hid_street = document.getElementById("hid_street").value;
  if(area){
	  var url = "ajax.php?mod=member&code=sel&type=top&area="+area+"&hid_street="+hid_street;
	  var myAjax=$.post(
			  	url,
			  	function(d){
					if(d){
						document.getElementById("street").style.display = "block";
					    $('#' + "street").html(d);
					}else{
						document.getElementById("street").style.display = "none";
					}
			  	}
	  );
  }else{
	  document.getElementById("street").style.display = "none";
  }
  document.getElementById("hid_city").value = '';
  document.getElementById("hid_area").value = '';
  document.getElementById("hid_street").value = '';
}
</script>
